<template>
  <ul class="todo-list">
    <!-- completed: 完成的类名 -->
    <li class="completed"   v-for="item in list" :key="item.id">
      <div class="view">
        <input class="toggle" type="checkbox"  v-model= "item.isDone"/>
        <label>{{item.name}}</label>
        <button class="destroy" @clik="$store.commit('delete',item.id)"></button>
      </div>
    </li>
  </ul>

  
</template>

<script>
import {mapGetters} from "vuex"
export default {
  computed:{
  ...mapGetters(['list'])
  },

}
</script>
